package org.jradweb.core.orm;

import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import org.apache.log4j.Logger;
import org.hibernate.validator.ClassValidator;
import org.hibernate.validator.InvalidValue;
/**
 * 
 *
 * Created On 2008-4-7
 * @author <a href="mailto:wagzhi@gmail.com">Paul Wang</a>
 * @version $Id: AbstarctModel.java 96 2008-04-10 09:41:19Z wagzhi $
 */
@javax.persistence.MappedSuperclass
public abstract class AbstarctModel extends JModel{
	private static final Logger log=Logger.getLogger(AbstarctModel.class);
	
	protected int id;
	protected Date createdAt = new Date();
	protected Date updatedAt = new Date();
	

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Column(name = "created_at")
	public Date getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	@Column(name = "updated_at")
	public Date getUpdatedAt() {
		return updatedAt;
	}

	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}
	
	
}
